<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增安全生产检查记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-records-add">
        	<input name="gcProjectid" th:value="${gcProjectSgazht.gcProjectid}" type="hidden">
        	<input name="sgazhtId" th:value="${gcProjectSgazht.id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">项目编号：</label>
                <div class="col-sm-4">
                    <input name="orderNo" class="form-control" type="text" th:value="${gcProjectSgazht.orderNo}" readonly="readonly" required>
                </div>
                <label class="col-sm-2 control-label is-required">工程名称：</label>
                <div class="col-sm-4">
                    <input name="name" class="form-control" type="text" th:value="${gcProjectSgazht.name}" readonly="readonly" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">检查人员：</label>
                <div class="col-sm-4">
                    <input name="inspectors" class="form-control" type="text" required>
                </div>
                <label class="col-sm-2 control-label is-required">记录人：</label>
                <div class="col-sm-4">
                    <input name="recorder" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">检查时间：</label>
                <div class="col-sm-4">
                    <div class="input-group date">
                        <input name="checkAt" th:value="${checkAt}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
                <label class="col-sm-2 control-label is-required">检查部位：</label>
                <div class="col-sm-4">
                    <input name="checkPoint" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label is-required">检查情况：</label>
                <div class="col-sm-10">
                    <textarea rows="5" name="checkDescs" class="form-control" required></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label is-required">整改意见：</label>
                <div class="col-sm-10">
                    <textarea rows="5" name="rectification" class="form-control" required></textarea>
                </div>
            </div>
        </form>
    </div>
    
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/checkRecords"
        $("#form-records-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/add", $('#form-records-add').serialize());
            }
        }

        $("input[name='checkAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

    </script>
</body>
</html>